package org.example.springmvc1;

/**
 * 简单的信息和传递参数
 */

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class Spring1 {
    @RequestMapping("/method1")
    public String method1(){
        return "hello spring";
    }
    @RequestMapping("/method2")
    public String method2(String name){
        return "接收到了参数" + name;
    }
}
